package cn.itcast.feign.client;

import cn.itcast.feign.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author HYK
 * @date 2022/9/20
 */
@FeignClient("userservice")
public interface UserClient {
    /**
     * 通过id查询
     *
     * @param id id
     * @return {@link User}
     */
    @GetMapping("/user/{id}")
    User findById(@PathVariable("id") Long id);
}
